const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
  // 忽略modules包
  transpileDependencies: false,
  // 运行时自动打开
  lintOnSave: true,
  pages: {
    index: {
      entry: 'src/main.js',
      template: 'public/index.html',
      filename: 'index.html'
    },
    download: {
      entry: 'src/download.js',
      template: 'public/download.html',
      filename: 'download.html'
    }
  },
  // 端口代理设置
  devServer: {
    port: 8080,
    open: true,
    proxy: {
      '/api': {
        target: process.env.BASE_URL,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
});
